import React from 'react';
import '@testing-library/jest-dom/extend-expect';
import { render } from '@testing-library/react';
import Radio from './Radio';

test('should render with the correct props', () => {
    const radioInput = render(<Radio label="Метка радио" checked />);
    expect(radioInput.container).toBeInTheDocument();
});

test('рендерит отключенный компонент Radio', () => {
    const { getByLabelText } = render(<Radio label="Метка радио" disabled />);
    const radioInput = getByLabelText('Метка радио');

    expect(radioInput).toBeInTheDocument();
    expect(radioInput).toBeDisabled();
});
